<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<title><s:property value='%{getText("reader_edit_title")}' /></title>
		<link href="/SCMDB/style/SuperEdit.css" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript" src="/SCMDB/js/Super.js"></script>
	</head>
	<body>
		<div class="main">
			<s:form action="readerAction!editReader" theme="simple"
				onsubmit="return false;">
				<s:hidden name="entity.id"></s:hidden>
				<!-- 主体开始 -->
				<table border="0" cellpadding="1" cellspacing="1"
					class="tableModify">
					<tr>
						<th>
							<s:property value='%{getText("reader_new_th1")}' />
						</th>
						<td>
							<s:textfield name="entity.lrmID" cssClass="sInput" title='%{getText("reader_new_th1")}' cssStyle="width:160px;" />
							<input type="hidden" value="must-input;must-number"/>
						</td>
					</tr>
					<tr>
						<th>
							<s:property value='%{getText("reader_new_th2")}' />
						</th>
						<td>
							<s:textfield name="entity.lrmName" cssClass="sInput" title='%{getText("reader_new_th2")}' cssStyle="width:160px;"/>
						</td>
					</tr>
					<tr>
						<th>监控每日安全讲评：</th>
						<td>
							<div class="right"><s:radio list="#{true:'是',false:'否'}" name="entity.monitorDaySecurity" ></s:radio></div>
						</td>
					</tr>
					<tr>
						<th>安全培训交底：</th>
						<td>
							<s:select
								tooltip="选择安全培训交底"
            					label="安全培训交底"
								list="#request.trainingList"
								name="securityTrainingId"
								headerKey=""
								headerValue="--请选择--"
								listKey="sysId"
								listValue="title"
								value="entity.securityTraining.sysId"
							/>
						</td>
					</tr>
					<tr>
						<th>危险源监管人员：</th>
						<td>
							<s:textfield readonly="true" name="entity.dangerousMansName" id="dangerousMansName" cssClass="sInput" title='交底人' cssStyle="width:160px" />
							<span style="cursor:pointer" onclick="selectEmployee();">选择人员</span>
							<span style="cursor:pointer" onclick="clearSelectEmployee();">清除</span>
							<s:hidden name="entity.dangerousMans" id="dangerousMans"></s:hidden>
						</td>
					</tr>
					<tr>
						<th>危险源监管人员未到场<br />多长时间发送短信通知</th>
						<td>
							<s:textfield name="entity.oftenHoursSendSMS" cssClass="sInput" title="多长时间后发送短信通知" cssStyle="width:52px" />  小时
							<input type="hidden" value="must-input"/>
						</td>
					</tr>
					<tr>
						<th>
							危险源性质：
						</th>
						<td>
							<s:textfield name="entity.rmk" cssClass="sInput" title='危险源性质' cssStyle="width:160px;" />
						</td>
					</tr>
					<tr>
						<th>
							所属监控图：
						</th>
						<td>
							<s:select label="" 
							value="entity.mapID" 
							list="#{'1':'地下监控图', '2':'地上监控图', '3':'工程示意图'}" 
							name="mapID" />
						</td>
					</tr>
					<tr>
						<th>
							读头半径：
						</th>
						<td>
							<s:textfield name="entity.lrmRadius" cssClass="sInput" title='读头半径' cssStyle="width:160px;" />
						</td>
					</tr>	
					<tr style="display: none;">
						<th>上级读头编号：</th>
						<td>
							<s:textfield name="entity.previousReaders" cssClass="sInput" title="上级读头编号" cssStyle="width:160px;"></s:textfield>
							多个用（,）隔开
						</td>
					</tr>
					<tr style="display: none;">
						<th>下级读头编号：</th>
						<td>
							<s:textfield name="entity.behindReaders" cssClass="sInput" title="下级读头编号" cssStyle="width:160px;"></s:textfield>
							多个用（,）隔开
						</td>
					</tr>
					<tr style="display:none">
						<th>
							<s:property value='%{getText("reader_new_th3")}' />
						</th>
						<td>
							<s:select list="#session.readerType" listKey="key" listValue="value" name="entity.lrmType"></s:select>
						</td>
					</tr>
				</table>
			</s:form>
		</div>
	</body>
	<script type="text/javascript">
		function selectEmployee() {
			var settings = 'help:no;scroll:auto;status:no;dialogWidth:'+900 +'px;dialogHeight:'+580+'px';
			var result = window.showModalDialog("/SCMDB/emp/selectOM.jsp", null,settings);
			document.getElementById("dangerousMans").value = result.id;
			document.getElementById("dangerousMansName").value = result.name;
		}
		function clearSelectEmployee() {
			document.getElementById("dangerousMans").value = "";
			document.getElementById("dangerousMansName").value = "";
		}
	</script>
</html>



